﻿using System;
using Telerik.Web.UI;

public partial class ltMan_stat_loginLogList : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlPager pager = new SqlPager("lt_loginlog", "id", "*");
        pager.OrderBy = "dat desc";
        RadGridBinder.Create(RadGrid1, pager);
    }
    protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)
    {
        ltModel.BLL.loginlog llg = new ltModel.BLL.loginlog();
        int id = int.Parse(GridCommander.ExtractValue(e, "id"));
        OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "登陆日志-删除>" + id);
        llg.Delete(id);
    }
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "Clear")
        {
            new ltModel.BLL.loginlog().Delete(string.Format(" zt = '{0}' ", e.CommandArgument.ToString()));
            RadGrid1.Rebind();
        }
    }
}